<include file="public@header" />
</head>

<body>
    <div class="wrap">
        <ul class="nav nav-tabs">
            <li class="active">
                <a>订单列表</a>
            </li>
            <!-- <li class=""><a href="{:url('admin/device/add')}">添加设备</a></li> -->
        </ul>
        <div class="well form-inline margin-top-20" style="height: 100px;">
            <form method="post" action="{:url('admin/order/index')}" style="width:50%;float: left; ">
                <input type="hidden" name="type" value="id" />
                <!-- 用户ID：
        <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
               placeholder="请输入用户ID"> -->
                <span style="float: left;margin-top: 7px">订单编号:</span>
                <input class="form-control" type="text" name="keyword" style="width: 200px;float: left;" placeholder="用户名/昵称/邮箱/手机">
                <input type="submit" class="btn btn-primary" value="搜索" style="float: left;"/>
                <!-- <a class="btn btn-danger" href="{:url('admin/device/index')}">清空</a> -->
            </form>
            <form method="post" action="{:url('admin/order/index')}" style="width:50%; float: left">
                <input type="hidden" name="type" value="name" />
                <!-- 用户ID：
        <input class="form-control" type="text" name="uid" style="width: 200px;" value="{:input('request.uid')}"
               placeholder="请输入用户ID"> -->
                <span style="float: left;margin-top: 7px">用户名:</span>
                <input class="form-control" type="text" name="keyword" style="width: 200px;float: left;" placeholder="用户名/昵称/邮箱/手机">
                <input type="submit" class="btn btn-primary" value="搜索" style="float: left;"/>
                <!-- <a class="btn btn-danger" href="{:url('admin/device/index')}">清空</a> -->
            </form>
        </div>
        <form method="post" class="js-ajax-form">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th>订单编号</th>
                        <th>用户名</th>
                        <th>设备名</th>
                        <th>订单时间</th>
                        <th>商品编号</th>
                        <th>订单状态</th>
                        <th>订单金额</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody>
                    <foreach name="list" item="vo">
                        <tr>
                            <td>{$vo.order_id}</td>
                            <td>{$vo.user_nickname}</td>
                            <td>{$vo.device_name}</td>
                            <td>{:date("Y年m月d日 H时i分s秒",$vo.create_time)}</td>
                            <td>{$vo.item_id}</td>
                            <td>

                                <switch name="vo.status">
                                    <case value="0">未付款</case>
                                    <case value="1">已付款</case>
                                    <case value="2">已完成</case>
                                    <default />未知状态
                                </switch>

                            </td>
                            <td>{$vo.money}</td>
                            <td>
                                <a href="{:url('admin/device/edit',array('id'=>$vo['id']))}" class="js-ajax-btn" data-msg="">编辑</a>
                                <a href="{:url('admin/device/deleteDevice',array('id'=>$vo['id']))}" class="js-ajax-dialog-btn" data-msg="">删除</a>
                            </td>
                        </tr>
                    </foreach>
                </tbody>
            </table>
            <div class="pagination">{$page}</div>
        </form>
    </div>
    <script src="__STATIC__/js/admin.js"></script>
</body>

</html>